Page({

  data: {

  },

  onLoad: function (e) {
    let examid = e.examid;
    let md5 = e.md5;

    var ytimesf = e.ytimes.split(":")[0]
    var ytimesm = e.ytimes.split(":")[1]
    this.setData({
      ordernum: e.ordernum,
      md5,
      examid,
      rightNum: e.greenNum,
      errNum: e.redNum,
      unAnswerNum: e.allQuestionCount - e.allNum,
      ytimesf: ytimesf,
      ytimesm: ytimesm,
    })
  },

  onReady: function () {

  },

  onShow: function () {

  },
  goRank: function () {
    let url = '/pages/rank/rank?md5='+this.data.md5;
    wx.navigateTo({
      url: url
    })
  },
  examBack: function () {
    let ordernum = this.data.ordernum;
    wx.navigateTo({
      url: "../view/view?ordernum="+ordernum+"&timeback=1&passf=" + this.data._repeat_passf + "&time=19&training_qids=0&nums=" + this.data._repeat_num
    });
  },

  exam_repeat: function () {

    wx.redirectTo({
      url: "../examhome/examhome?id="+this.data.examid
    });
  },

  _repeat_examGo: function (e) {
    if (!e.data.category.time) return wx.showLoading({
      title: "考题读取中"
    }), void setTimeout(function () {
      wx.hideLoading();
    }, 999);
    wx.removeStorage({
      key: "exam" + this.data.category.id
    }), wx.removeStorage({
      key: "examlist" + this.data.category.id
    }), wx.removeStorage({
      key: "examind" + this.data.category.id
    }), wx.removeStorage({
      key: "examids" + this.data.category.id
    }), wx.removeStorage({
      key: "examall" + this.data.category.id
    }), wx.redirectTo({
      url: "../exam/exam?passf=" + e.data.category.passf + "&time=" + (e.data.category.time - 1) + "&training_qids=0&nums=" + e.data.category.number
    });
  }
})